/*
* Copyright© 2018 Shanxi Lu'an Taihang Laihui Net Tech co.,LTD.
*/
package com.laihuichuxing.train.dao;

import com.laihuichuxing.order.train.entity.OrderRecord;
import com.laihuichuxing.order.train.entity.Passenger;
import com.laihuichuxing.order.train.entity.TrainOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author LiPengpeng
 */
public interface OPticketDAO {

	/**
	 * 修改
	 * @param result
     */
	void update(Map<String, Object> result);

	/**
	 * 查询
	 * @param paramMap
	 * @return
     */
	Map<String, Object> selectOne(Map<String, String> paramMap);

	/**
	 * 检查
	 * @param order
	 * @return
     */
	String checkCancelCount(Map<String, Object> order);

	/**
	 * 查询
	 * @param orderNo
	 * @return
     */
	int selectExist(@Param("orderNo") String orderNo);

	/**
	 * 查询订单
	 * @param orderNo
	 * @return
     */
	Map<String, Object> selectOrder(@Param("orderNo") String orderNo);

	/**
	 * 修改
	 * @param orderRecord
	 * @return
     */
	int updateRecord(OrderRecord orderRecord);

	/**
	 * 修改
	 * @param passer
	 * @return
     */
	int updatePassengerOrder(Passenger passer);

	/**
	 * 修改订单
	 * @param order
	 * @return
     */
	int updateOrder(TrainOrder order);

	/**
	 * 改变
	 * @param passer
	 * @return
     */
	int changePassengerOrder(Passenger passer);

	/**
	 * 添加
	 * @param passer
	 * @return
     */
	int insertPassengerOrder(Passenger passer);

	/**
	 * 获取
	 * @param orderNo
	 * @param passengerId
     * @return
     */
	Passenger getPassengerOrder(@Param("orderNo") String orderNo, @Param("passengerId") String passengerId);

	/**
	 * 获取
	 * @param orderNo
	 * @return
     */
	List<Passenger> getPassengerOrderList(String orderNo);

	/**
	 * 查询
	 * @param orderNo
	 * @return
     */
	TrainOrder queryOrder(String orderNo);

	/**
	 * 查询
	 * @param paramMap
	 * @return
     */
	List<Map<String, Object>> queryRefundOrder(Map<String, String> paramMap);

	/**
	 * 查询
	 * @param orderNo
	 * @return
     */
	Passenger queryChangeOrder(@Param("orderNo") String orderNo);

	/**
	 * specialMethodToChange
	 * @param originalOrderNo
	 * @param orderNo
     * @return
     */
	int specialMethodToChange(@Param("originalOrderNo") String originalOrderNo, @Param("orderNo") String orderNo);

	/**
	 * 查询
	 * @param orderNo
	 * @return
     */
    Map<String,Object> selectOrderByOutNo(@Param("orderNo") String orderNo);

	/**
	 * 获取价格
	 * @param orderNo
	 * @return
     */
    String getPrice(@Param("orderNo") String orderNo);

	/**
	 * 修改
	 * @param passer
	 * @return
     */
	int updatePassengerStatus(Passenger passer);

	/**
	 * 根据订单号查询订单
	 * @param paramMap
	 * @return
	 */
	Map<String, Object> selectOrderByOrderNo(Map<String, String> paramMap);
	/**
	 * 根据订单号查询老订单
	 * @param orderNo
	 * @return
	 */
	Map<String, Object> selectOldOrderByOrderNo(String orderNo);
	/** 
	 * Description: 修改 
	 * @param  
	 * @return  
	 * @author QinXueFeng
	 * Create Date Time: 2018/12/14 15:29
	 * Update Date Time:
	 */ 
	int updateEnable(Map<String, Object> m);
}
